#include "muduo/net/EventLoop.h"
#include "muduo/base/Thread.h"
#include <stdio.h>

using namespace muduo;
using namespace muduo::net;

EventLoop *g_loop;
void threadFunc()
{
    //当前id和loop所在线程id不同，会进入断言！！！程序异常终止
    g_loop->loop();
}

int main()
{
    EventLoop loop;
    g_loop = &loop;
    Thread t(threadFunc);
    t.start();
    t.join();
    return 1;
}